package com.soft.line.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class MenuInfo {

    private Integer id;

    private String menuIcon;

    @ApiModelProperty(value = "菜单名")
    @NotNull(message = "菜单名不能为空")
    @Length(min=4,max = 20,message="菜单名称长度不能小于4位，且不能大于20位")
    private String menuName;

    private Integer state;

    @ApiModelProperty(value = "菜单路径")
    @NotNull(message = "菜单路径不能为空")
    @Length(max =255,message="菜单路径长度不能小于4位，且不能大于20位")
    private String menuUrl;

    @ApiModelProperty(value = "菜单排序")
    @NotNull(message = "菜单排序不能为空")
    private String orderBy;

    private Integer pId;

    private String modifyPerson;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date modifyTime;

    private List<ButtonInfo> buttonInfoList;

    public Integer getpId() {
        return pId;
    }

    public void setpId(Integer pId) {
        this.pId = pId;
    }
}